<?php

class HomeController extends BaseController {
    protected $layout = 'layouts.shopdt';

    public function index() {
        $products = Product::listProduct(array(), Config::get('constants.PAGING_NUMBER_SITE'));

        return View::make('shopdt.home.index', array('products' => $products))->with('title', 'Home');
    }

    public function category($id) {
        $products = Product::listProduct(array('category_id' => $id), Config::get('constants.PAGING_NUMBER_SITE'));

        return View::make('shopdt.home.index', array('products' => $products))->with('title', 'Home');
    }

    public function manufacturer($id) {
        $products = Product::listProduct(array('manufacturer_id' => $id), Config::get('constants.PAGING_NUMBER_SITE'));

        return View::make('shopdt.home.index', array('products' => $products))->with('title', 'Home');
    }
}
